package sample.client;

/**
 * Created by shadowedge on 2019/2/13.
 */
public class SomePojo {
    private String name = "haha";

    /* 一种单例模式：并发情况下变量内容会被篡改！*/
    public static SomePojo singleton = new SomePojo();

    public static SomePojo instance(String name){
      return  new SomePojo(name);
    }

    public void setName(String name){
        this.name = name;
    }

    public String getName(){
        return name;
    }

    public SomePojo(){
    }

    public SomePojo(String name){
        this.name = name;
    }
}
